package Polymorphism;

public class VegetarianGroup {

	private Rabbit theRabbit;
	private Deer theDeer;
	
	public VegetarianGroup (Rabbit theRabbit, Deer theDeer){
		
		this.theRabbit = theRabbit;
		this.theDeer = theDeer;
	}
	
	public void executePolymorphism(){
		
		Vegetarian myGroup[] = new Vegetarian[2];
		myGroup[0] = theRabbit;
		myGroup[1] = theDeer;
		
		Deer d = theDeer;
		Animal a = d;
		Vegetarian v = d;
		Object o = v;
	}
}
